package szc.common.code.rule;

import szc.common.code.enums.CodeLineParserEnum;
import szc.common.code.enums.FileTypeEnum;

/**
 * @desc 解析器：多行注释结束
 * @author songzc
 * @date 2022/6/18
 */
public class MultipleEndCommentCodeLineParser extends CodeLineParserAbstract {
	public MultipleEndCommentCodeLineParser(FileTypeEnum fileTypeEnum){
		this.parserType = CodeLineParserEnum.MULTIPLE_END_COMMENT_CODE_LINE;
		this.fileTypeEnum = fileTypeEnum;
	}

	@Override
	public boolean parseCodeLine() {
		if (this.codeLine.endsWith(fileTypeEnum.getEndComment())) {
            // 为多行注释的结束行  
			++this.lineCount;
			for(IParserStatusWatcher watcher : this.parseStatusWatcherGroup){
				watcher.changeWatcherStatus(false);
			}
        	return true;
        }
		return false;
	}

}